﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Entity;

namespace DAO
{
    public class ProvinceDAO
    {
        BMS_DatabaseEntities context = new BMS_DatabaseEntities();
        public List<ProvinceEntity> LoadProvince(string CountryName)
        {
            var query = from p in context.PROVINCE_INFO
                        where p.COUNTRY_NAME == CountryName
                        select new ProvinceEntity
                        {
                            Province = p.PROVINCE_NAME,
                        };

            return query.ToList<ProvinceEntity>();
        }
    }
}
